import Component,{get,post,path} from '../ZES'
import File from './file';
import User from './user';

export default class Index extends Component {

    constructor(){
        super("/");
        this.mount(new File("file"));
        this.mount(new User("user"));
    }

    @path("/*.html")
    @get async page(cx) {
        cx.state = {entry: "/view/pages" + cx.path.slice(0, -5) + "/index.jsx.js"};
        await cx.render('template');
        cx.sent=true;
    }
}

